<?php
/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Badge
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
?>
<?php if (count($this->badges)): ?>
  <ul class='badges_badge_list'>
  <?php foreach ($this->badges as $badge): ?>
    <li>
      <div class="badge_photo"><?php echo $this->htmlLink($badge->getHref(), $this->itemPhoto($badge, 'thumb.profile'),
        $badge->getDescription() ? array('class' => 'BadgeTip','title'=>$badge->getTitle(), 'rel'=>$badge->getDescription()) : array()
      ); ?></div>
      <?php if ($this->showtitle): ?>
        <div class="badge_title"><?php echo $this->htmlLink($badge->getHref(), $badge->getTitle())?></div>
      <?php endif;?>
    </li>
  <?php endforeach; ?>
  </ul>
  
  <script language="Javascript">
  
  en4.core.runonce.add(function(){
    
    var ListBadgeBadgeTip = new Tips($$('.BadgeTip'), {
      initialize:function(){
        this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
      },
        
      className: 'badge_bubble',
      showDelay: 400,
      hideDelay: 400
    });
    
  });
  </script>    
  
<?php endif; ?>